package com.yanjiali.controller;

import com.yanjiali.model.R;
import com.yanjiali.model.resp.GetSecondLevelCollectListByIdResp;
import com.yanjiali.service.SecondLevelCollectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package: com.yanjiali.controller
 * @Author: yanjiali
 * @Created: 2025/4/26 21:31
 */
@Api(tags = "二级收藏控制器")
@RestController
@RequestMapping("/v1/secondLevelCollect")
public class SecondLevelCollectController {

    @Autowired
    private SecondLevelCollectService secondLevelCollectService;

    //TODO
    @GetMapping("/getList")
    @ApiOperation("通过一级收藏夹名获取其中所有二级收藏夹名（不含一级）")
    public R<GetSecondLevelCollectListByIdResp> getSecondLevelCollectListByName(@RequestParam String oneDirName) {
        return secondLevelCollectService.getSecondLevelCollectListByName(oneDirName);
    }
}
